<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <!-- <button v-on:click="fn">按钮</button>
    <button v-on:click="fn2('这是传递的参数')">按钮</button>
    <button v-on:click="msg='在行内直接修改数据'">直接在行内修改数据</button> -->

    <button @click="fn">按钮</button>
    <button @click="fn2('这是传递的参数')">按钮</button>
    <button @click="msg='在行内直接修改数据'">直接在行内修改数据</button>
    {{ msg }}
  </div>
  <script src="./vue.js"></script>
  <script>
    
    const vm = new Vue({
      el: '#app',
      data: {
        msg: '这是表单的值'
      },
      methods: {
        fn(){
          this.msg = '值改变了'
        },
        fn2(msg){
          this.msg = msg
        }
      }
    })
  </script>
</body>
</html>